package org.mayanjun.code.dalint.id;

/**
 * AbstractIdWorkerBroker
 *
 * @author mayanjun(6/28/16)
 */
public abstract class AbstractIdWorkerBroker implements IdWorker {

    private IdWorker worker;

    @Override
    public long nextId() {
        return worker.nextId();
    }

    /**
     * Initialize id worker
     * @param index the index number used by worker
     */
    protected void initWorker(int ...index) {
        worker = new StardardIdWorker(index);
    }

}
